import React, { Component } from 'react'

export class My_children extends Component {
    render() {
        console.log(this);
        return (
            <div>
                My_children
                {
                    this.props.children.map((item,index)=>{
                        return item.type? <item.type key={index}>{item.props.children}</item.type>
                        : <p key={index}>{item}</p>

                    })
                }
            </div>
        )
    }
}

export default My_children
